<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="/include/head.jsp"%>
<div class="pageHeader">
	<form rel="pagerForm" id="searchForm" onsubmit="return navTabSearch(this);" action="sys/user/userPager.do?ACTION=${ACTION}&TODO=${TODO}" method="post">
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td>
						用户姓名:<input type="text" name="map.userName_L" value="${pager.scMap.userName_L}">
						<input type="hidden" name="map.userType" value="${pager.scMap.userType}">
		       			更新时间起:<input type="text" name="map.updateDate_B" value="${pager.scMap.updateDate_B}" class="date textInput readonly" readonly="true" >
		       			更新时间止:<input type="text" name="map.updateDate_E" value="${pager.scMap.updateDate_E}" class="date textInput readonly" readonly="true" >
		      			</td>
				</tr>
			</table>
		 		<div class="subBar">
				<ul>
					<li><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></li>
				</ul>
			</div>
		</div>
	</form>
</div>

<div class="panelBar">
	<ul class="toolBar"><!-- 
		<li><a class="add" href="user/user/toEdit/-99999999.do?funId=${funId}" target="navTab" rel="userEdit"><span>添加新用户</span></a></li> -->
		<li><a class="icon" href='javascript:exportExcel($("#searchForm",navTab.getCurrentPanel()), $("#pagerForm",navTab.getCurrentPanel()))' title="确实要导出这些记录吗?"><span>导出EXCEL</span></a></li>
		<li><a class="icon" href="javascript:$.printBox('w_list_print')"><span>打印</span></a></li>
	</ul>
</div>

<div layoutH="116" id="w_list_print">
	<table class="table" width="98%" targetType="navTab" asc="asc" desc="desc">
		<thead>
			<tr>
				<th width="30">No.</th>
				<th width="175"  orderField="userName" <c:if test='${pager.orderField=="userName"}'>class="${param.orderDirection}"</c:if> >用户姓名</th>
				<th width="75" orderField="userType" <c:if test='${pager.orderField=="userType"}'>class="${param.orderDirection}"</c:if> >用户类型</th>
				<th width="75" orderField="telNo" <c:if test='${pager.orderField=="telNo"}'>class="${param.orderDirection}"</c:if> >手机号</th>
				<th width="75" orderField="account" <c:if test='${pager.orderField=="account"}'>class="${param.orderDirection}"</c:if> >登录名</th>
				<th width="75">是否领导</th>
				<th orderField="roleNames" <c:if test='${pager.orderField=="roleNames"}'>class="${param.orderDirection}"</c:if> >角色</th>
				<th>备注</th>
				<th width="40">状态</th>
				<th width="215">操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${pager.resultList}" var="item" varStatus="varStatus">
				<tr target="sid_${entity }" rel="${item.id}">
					<td align="right">${varStatus.count}</td>	
					<td>${item.userName}</td><!-- 
					<td>${item.levelInt==1?'老板':item.levelInt==2?'财务':'业务员'}</td> -->
					<td>${Dict.getAlias('USER_TYPE',item.userType)}</td>		
									
					<td>${item.telNo}</td>						
					<td>${item.account}</td>			
					<td>${item.isLeader=="1"?"是":"否"}</td>		
					<td>${item.roleNames}</td>		
					<td>${item.remark}</td>
					<td>
					    ${item.activeStatusInt==1?'正常':'已停用'}
					</td>
					<td>
					
					<c:if test="${TODO=='EDIT'}">
						<!-- 
					    <a title="删除用户" target="navTab" href="sys/user/toDel/${item.id}.do?funId=${funId}" class="btnDel" rel="userEdit">停用启用</a>
					     -->
						<a title="编辑用户"  target="navTab"  href="zdzx/toZdzxEmpEditor/${item.empId}.do?ACTION=MODIFY&TODO=UPDATE&funId=${funId}" class="btnEdit">编辑用户</a>
					    <c:if test="${item.activeStatusInt==1}">
							<a title="确认停用该账号吗?" href="common/updateStatus.do?userType=ZdzxEmp&id=${item.empId}&status=0" target="ajaxTodo" rel="dsEmpEditor">停用</a>&nbsp;&nbsp;
					    </c:if>
					    <c:if test="${item.activeStatusInt!=1}">
							<a title="确认启用该账号吗?" href="common/updateStatus.do?userType=ZdzxEmp&id=${item.empId}&status=1" target="ajaxTodo" rel="dsEmpEditor">启用</a>&nbsp;&nbsp;
					    </c:if>
						<a title="确认重置密码吗?" href="sys/user/resetPwd.do?userType=ZdzxEmp&id=${item.empId}" target="ajaxTodo" rel="dsEmpEditor">重置密码</a>&nbsp;&nbsp;
						<a title="分配角色" target="dialog" href="sys/user/toAssign/${item.id}.do?funId=${funId}"  mask="true">分配角色</a>
					</c:if>
						
					</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
</div>
<jsp:include page="../include/pagerDiv.jsp" flush="true" />